#include "config.h"  // 包含生成的配置文件，其中定义了各种系统信息宏

#include <cstdlib>   // 包含标准库头文件，提供EXIT_SUCCESS等宏
#include <iostream>  // 包含输入输出流头文件

int main() {
  // 输出逻辑核心数
  std::cout << "Number of logical cores: " << NUMBER_OF_LOGICAL_CORES << std::endl;
  // 输出物理核心数
  std::cout << "Number of physical cores: " << NUMBER_OF_PHYSICAL_CORES << std::endl;

  // 输出总虚拟内存（MB）
  std::cout << "Total virtual memory in megabytes: " << TOTAL_VIRTUAL_MEMORY
            << std::endl;
  // 输出可用虚拟内存（MB）
  std::cout << "Available virtual memory in megabytes: " << AVAILABLE_VIRTUAL_MEMORY
            << std::endl;
  // 输出总物理内存（MB）
  std::cout << "Total physical memory in megabytes: " << TOTAL_PHYSICAL_MEMORY
            << std::endl;
  // 输出可用物理内存（MB）
  std::cout << "Available physical memory in megabytes: "
            << AVAILABLE_PHYSICAL_MEMORY << std::endl;

  // 输出是否为64位处理器
  std::cout << "Processor is 64Bit: " << IS_64BIT << std::endl;
  // 输出是否支持浮点运算单元
  std::cout << "Processor has floating point unit: " << HAS_FPU << std::endl;
  // 输出是否支持MMX指令集
  std::cout << "Processor supports MMX instructions: " << HAS_MMX << std::endl;
  // 输出是否支持扩展MMX指令集
  std::cout << "Processor supports Ext. MMX instructions: " << HAS_MMX_PLUS
            << std::endl;
  // 输出是否支持SSE指令集
  std::cout << "Processor supports SSE instructions: " << HAS_SSE << std::endl;
  // 输出是否支持SSE2指令集
  std::cout << "Processor supports SSE2 instructions: " << HAS_SSE2 << std::endl;
  // 输出是否支持SSE浮点指令
  std::cout << "Processor supports SSE FP instructions: " << HAS_SSE_FP << std::endl;
  // 输出是否支持SSE MMX指令
  std::cout << "Processor supports SSE MMX instructions: " << HAS_SSE_MMX
            << std::endl;
  // 输出是否支持3DNow!指令
  std::cout << "Processor supports 3DNow instructions: " << HAS_AMD_3DNOW
            << std::endl;
  // 输出是否支持3DNow!+指令
  std::cout << "Processor supports 3DNow+ instructions: " << HAS_AMD_3DNOW_PLUS
            << std::endl;
  // 输出是否为IA64处理器模拟x86
  std::cout << "IA64 processor emulating x86 : " << HAS_IA64 << std::endl;

  // 输出操作系统名称
  std::cout << "OS name: " << OS_NAME << std::endl;
  // 输出操作系统子类型
  std::cout << "OS sub-type: " << OS_RELEASE << std::endl;
  // 输出操作系统构建ID
  std::cout << "OS build ID: " << OS_VERSION << std::endl;
  // 输出操作系统平台
  std::cout << "OS platform: " << OS_PLATFORM << std::endl;

  // 返回成功状态
  return EXIT_SUCCESS;
}
